package com.gaoding.shared.dict.sdk.configuration;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @Description:
 * @Author: 西格 xige@gaoding.com
 * @date 2021-02-05 14:03
 */

@ConfigurationProperties("dict.sdk")
public class DictSdkProperties {
    /**
     * 单个服务拉取超时时间
     */
    private String timeoutEachServiceDataLoad;
    /**
     * 拉取所有服务总超时时间
     */
    private String timeoutServiceDataLoad;
    /**
     * 初始化总超时时间
     */
    private String timeoutInitData;
    /**
     * 全量延迟时间
     */
    private String fullUpdateInitDelayTime;
    /**
     * 全量拉取定时时间
     */
    private String fullUpdateDelay;
    /**
     * 增量延迟时间
     */
    private String incrementUpdateInitDelayTime;
    /**
     * 增量定时拉取时间
     */
    private String incrementUpdateDelay;
    /**
     * 是否开启拉取
     */
    private Boolean enable;
    /**
     * 多服务编码配置
     */
    private String multiApplicationNames;

    public Boolean getThrowEx() {
        if (isThrowEx==null){
            return false;
        }
        return isThrowEx;
    }

    public void setThrowEx(Boolean throwEx) {
        isThrowEx = throwEx;
    }

    /**
     * 拉取失败是否直接抛出异常  true 应用会强依赖字典拉取成功  false 字典拉取失败不影响应用正常启动
     */
    private Boolean isThrowEx;

    public String getTimeoutEachServiceDataLoad() {
        return timeoutEachServiceDataLoad;
    }

    public void setTimeoutEachServiceDataLoad(String timeoutEachServiceDataLoad) {
        this.timeoutEachServiceDataLoad = timeoutEachServiceDataLoad;
    }

    public String getTimeoutServiceDataLoad() {
        return timeoutServiceDataLoad;
    }

    public void setTimeoutServiceDataLoad(String timeoutServiceDataLoad) {
        this.timeoutServiceDataLoad = timeoutServiceDataLoad;
    }

    public String getTimeoutInitData() {
        return timeoutInitData;
    }

    public void setTimeoutInitData(String timeoutInitData) {
        this.timeoutInitData = timeoutInitData;
    }

    public String getFullUpdateInitDelayTime() {
        return fullUpdateInitDelayTime;
    }

    public void setFullUpdateInitDelayTime(String fullUpdateInitDelayTime) {
        this.fullUpdateInitDelayTime = fullUpdateInitDelayTime;
    }

    public String getFullUpdateDelay() {
        return fullUpdateDelay;
    }

    public void setFullUpdateDelay(String fullUpdateDelay) {
        this.fullUpdateDelay = fullUpdateDelay;
    }

    public String getIncrementUpdateInitDelayTime() {
        return incrementUpdateInitDelayTime;
    }

    public void setIncrementUpdateInitDelayTime(String incrementUpdateInitDelayTime) {
        this.incrementUpdateInitDelayTime = incrementUpdateInitDelayTime;
    }

    public String getIncrementUpdateDelay() {
        return incrementUpdateDelay;
    }

    public void setIncrementUpdateDelay(String incrementUpdateDelay) {
        this.incrementUpdateDelay = incrementUpdateDelay;
    }

    public String getMultiApplicationNames() {
        return multiApplicationNames;
    }

    public void setMultiApplicationNames(String multiApplicationNames) {
        this.multiApplicationNames = multiApplicationNames;
    }

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }
}
